<!-- HTML header for doxygen 1.8.18-->
<!DOCTYPE html
    PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=9" />
    <meta name="generator" content="Doxygen 1.8.16" />
    <meta name="viewport" content="width=device-width, initial-scale=1" />
    <title>LEAF: LEAF/leaf.h Source File</title>
    <link href="tabs.css" rel="stylesheet" type="text/css" />
    <script type="text/javascript" src="jquery.js"></script>
    <script type="text/javascript" src="dynsections.js"></script>
    <script type="text/javascript" src="../js/iframeResizer.contentWindow.min.js"></script>
    <!-- <script src="/js/template.js"></script> -->
     <link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  $(document).ready(function() { init_search(); });
/* @license-end */
</script> 
    <link href="doxygen.css" rel="stylesheet" type="text/css" />
    <link href="customdoxygen.css" rel="stylesheet" type="text/css"/>
    <!-- <link rel="stylesheet" href="/css/tachyons.css" type="text/css" /> -->
</head>
<body class="bg-washed-green black-70 ph0 sans-serif" onload="iframeResizePipe()">
    <div>
        <!-- do not remove this div, it is closed by doxygen! -->
        <div id="titlearea">
            <table cellspacing="0" cellpadding="0">
                <tbody>
                    <tr>
                    </tr>
                </tbody>
            </table>
        </div>
        <!-- end header part -->
    </div>
</body>
</html><!-- Generated by Doxygen 1.8.16 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_127e6aa213d41105176fe0c3bbb2560c.html">LEAF</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">leaf.h</div>  </div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160; </div>
<div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> ==============================================================================</span></div>
<div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> leaf.h</span></div>
<div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> Created: 20 Jan 2017 12:07:26pm</span></div>
<div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> Author:  Michael R Mulshine</span></div>
<div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> </span></div>
<div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> ==============================================================================</span></div>
<div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160; </div>
<div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="preprocessor">#ifndef LEAF_H_INCLUDED</span></div>
<div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="preprocessor">#define LEAF_H_INCLUDED</span></div>
<div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160; </div>
<div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="preprocessor">#define LEAF_DEBUG 0</span></div>
<div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160; </div>
<div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#if LEAF_DEBUG</span></div>
<div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &quot;../LEAF_JUCEPlugin/JuceLibraryCode/JuceHeader.h&quot;</span></div>
<div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160; </div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#if _WIN32 || _WIN64</span></div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160; </div>
<div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-global.h&quot;</span></div>
<div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-math.h&quot;</span></div>
<div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-mempool.h&quot;</span></div>
<div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-tables.h&quot;</span></div>
<div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-distortion.h&quot;</span></div>
<div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-oscillators.h&quot;</span></div>
<div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-filters.h&quot;</span></div>
<div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-delay.h&quot;</span></div>
<div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-reverb.h&quot;</span></div>
<div class="line"><a name="l00045"></a><span class="lineno">   45</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-effects.h&quot;</span></div>
<div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-envelopes.h&quot;</span></div>
<div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-dynamics.h&quot;</span></div>
<div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-analysis.h&quot;</span></div>
<div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-instruments.h&quot;</span></div>
<div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-midi.h&quot;</span></div>
<div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-sampling.h&quot;</span></div>
<div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-physical.h&quot;</span></div>
<div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;<span class="preprocessor">#include &quot;.\Inc\leaf-electrical.h&quot;</span></div>
<div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160; </div>
<div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;<span class="preprocessor">#else</span></div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160; </div>
<div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-global.h&quot;</span></div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-math.h&quot;</span></div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-mempool.h&quot;</span></div>
<div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-tables.h&quot;</span></div>
<div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-distortion.h&quot;</span></div>
<div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-dynamics.h&quot;</span></div>
<div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-oscillators.h&quot;</span></div>
<div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-filters.h&quot;</span></div>
<div class="line"><a name="l00065"></a><span class="lineno">   65</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-delay.h&quot;</span></div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-reverb.h&quot;</span></div>
<div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-effects.h&quot;</span></div>
<div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-envelopes.h&quot;</span></div>
<div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-analysis.h&quot;</span></div>
<div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-instruments.h&quot;</span></div>
<div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-midi.h&quot;</span></div>
<div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-sampling.h&quot;</span></div>
<div class="line"><a name="l00073"></a><span class="lineno">   73</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-physical.h&quot;</span></div>
<div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;<span class="preprocessor">#include &quot;./Inc/leaf-electrical.h&quot;</span></div>
<div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160; </div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160; </div>
<div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;<span class="keyword">extern</span> <span class="stringliteral">&quot;C&quot;</span> {</div>
<div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;    </div>
<div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160; </div>
<div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;    <span class="keywordtype">void</span>        <a class="code" href="group__leaf.html#ga13fefd14706bd5d85346066660f3c9eb">LEAF_init</a>            (<a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf, <span class="keywordtype">float</span> sampleRate, <span class="keywordtype">int</span> blockSize, <span class="keywordtype">char</span>* memory, <span class="keywordtype">size_t</span> memorySize, <span class="keywordtype">float</span>(*random)(<span class="keywordtype">void</span>));</div>
<div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    </div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160; </div>
<div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordtype">void</span>        <a class="code" href="group__leaf.html#gab84d5b2ad600cc920248996c86b72f9f">LEAF_setSampleRate</a>   (<a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf, <span class="keywordtype">float</span> sampleRate);</div>
<div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;    </div>
<div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160; </div>
<div class="line"><a name="l00163"></a><span class="lineno">  163</span>&#160;    <span class="keywordtype">float</span>       <a class="code" href="group__leaf.html#gaf680c38a6e3234739e57391650dea267">LEAF_getSampleRate</a>   (<a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf);</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;    </div>
<div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160; </div>
<div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;    <span class="keywordtype">void</span>        <a class="code" href="group__leaf.html#ga6ad73444bc6f242c30a83bddbd120052">LEAF_defaultErrorCallback</a>(<a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf, LEAFErrorType errorType);</div>
<div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;    </div>
<div class="line"><a name="l00171"></a><span class="lineno">  171</span>&#160;    <span class="keywordtype">void</span>        LEAF_internalErrorCallback(<a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf, LEAFErrorType whichone);</div>
<div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;    </div>
<div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160; </div>
<div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;    <span class="keywordtype">void</span> <a class="code" href="group__leaf.html#ga046f5f075ebc4562b8e2d97de4b69536">LEAF_setErrorCallback</a>(<a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span> leaf, <span class="keywordtype">void</span> (*callback)(<a class="code" href="struct_l_e_a_f.html">LEAF</a>* <span class="keyword">const</span>, LEAFErrorType));</div>
<div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;    </div>
<div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;<span class="preprocessor">#ifdef __cplusplus</span></div>
<div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;}</div>
<div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;<span class="preprocessor">#endif</span></div>
<div class="line"><a name="l00184"></a><span class="lineno">  184</span>&#160; </div>
<div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="preprocessor">#endif  // LEAF_H_INCLUDED</span></div>
<div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160; </div>
</div><!-- fragment --></div><!-- contents -->
<div class="ttc" id="agroup__leaf_html_ga6ad73444bc6f242c30a83bddbd120052"><div class="ttname"><a href="group__leaf.html#ga6ad73444bc6f242c30a83bddbd120052">LEAF_defaultErrorCallback</a></div><div class="ttdeci">void LEAF_defaultErrorCallback(LEAF *const leaf, LEAFErrorType errorType)</div><div class="ttdoc">The default callback function for LEAF errors.</div><div class="ttdef"><b>Definition:</b> leaf.c:58</div></div>
<div class="ttc" id="agroup__leaf_html_ga046f5f075ebc4562b8e2d97de4b69536"><div class="ttname"><a href="group__leaf.html#ga046f5f075ebc4562b8e2d97de4b69536">LEAF_setErrorCallback</a></div><div class="ttdeci">void LEAF_setErrorCallback(LEAF *const leaf, void(*callback)(LEAF *const, LEAFErrorType))</div><div class="ttdoc">Set the callback function for LEAF errors.</div><div class="ttdef"><b>Definition:</b> leaf.c:70</div></div>
<div class="ttc" id="agroup__leaf_html_gaf680c38a6e3234739e57391650dea267"><div class="ttname"><a href="group__leaf.html#gaf680c38a6e3234739e57391650dea267">LEAF_getSampleRate</a></div><div class="ttdeci">float LEAF_getSampleRate(LEAF *const leaf)</div><div class="ttdoc">Get the sample rate of LEAF.</div><div class="ttdef"><b>Definition:</b> leaf.c:53</div></div>
<div class="ttc" id="agroup__leaf_html_ga13fefd14706bd5d85346066660f3c9eb"><div class="ttname"><a href="group__leaf.html#ga13fefd14706bd5d85346066660f3c9eb">LEAF_init</a></div><div class="ttdeci">void LEAF_init(LEAF *const leaf, float sampleRate, int blockSize, char *memory, size_t memorySize, float(*random)(void))</div><div class="ttdoc">Initialize the LEAF instance.</div><div class="ttdef"><b>Definition:</b> leaf.c:21</div></div>
<div class="ttc" id="agroup__leaf_html_gab84d5b2ad600cc920248996c86b72f9f"><div class="ttname"><a href="group__leaf.html#gab84d5b2ad600cc920248996c86b72f9f">LEAF_setSampleRate</a></div><div class="ttdeci">void LEAF_setSampleRate(LEAF *const leaf, float sampleRate)</div><div class="ttdoc">Set the sample rate of LEAF.</div><div class="ttdef"><b>Definition:</b> leaf.c:47</div></div>
<div class="ttc" id="astruct_l_e_a_f_html"><div class="ttname"><a href="struct_l_e_a_f.html">LEAF</a></div><div class="ttdoc">Struct for an instance of LEAF.</div><div class="ttdef"><b>Definition:</b> leaf-global.h:31</div></div>
<!-- HTML footer for doxygen 1.8.18-->
<!-- start footer part -->
</body>
</html>
